var student = {
		
		init : function() {
			student.studentGrid=$('#studentGrid');
			

			student.studentGrid.datagrid({
			 	url:window.ctx + '/StudentServlet?command=StuExamList',
			 	fixed:true,
			    fitColumns: true,
			    striped: true,
			    rownumbers: true,
			    pagination: true,
			    pageSize: 5,
			    pageList: [5, 10, 15, 20],
			    pageNumber: 1,
			    sortName: 'examTimeStart',
			    sortOrder: 'ASC',
			    toolbar: '#studentToolbar',
			    columns:[[
			 
			        {field:'examTimeStart', title:'开始时间', width:100, align:'center', sortable: true},
					{field:'examTimeStop', title:'结束时间', width:100, align:'center'},
					{field:'examClassroom', title:'考试教室', width:100, align:'center'},
					{field:'qes_exam_paper__name', title:'考试科目', width:100, align:'center'},
					{field:'toClassId', title:'考试班级', width:100, align:'center'},
					{field:'operateTime', title:'发布时间', width:100, align:'center'},
					
			    ]],
			    onDblClickRow: function(rowIndex, rowData) {
			    	   /* main.tabs.tabs('add', {
							title: "考试页面",
							iconCls: 'icon-edit',
							closable: false,
							href: window.ctx + '/view/exam/exam-test.jsp?course='+'qes_exam_paper__name',
						});*/
//				    	 window.location.href = window.ctx + '/view/exam/exam-test.jsp';
				    	$.ajax({  
						     type:'POST',  
						     url : window.ctx + '/ExammingServlet?command=toShowPaperUI&id='+rowData.id, 
						     success: function(data) {
						    	 window.location.href = window.ctx + '/view/exam/exam-test.jsp?id='+data;
						     },
						});
				},
		});
		},
		toolbar: {
		
		}
}

					

$(function(){
	student.init();
});